<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="box">
        hello
        <p>jack</p>
    </div>
    <script>

        const box = document.getElementById('box');
        /*
            innerHTML vs textContent
            1. 读取
            2. 写入
        */
        setTimeout(() => {
            // box.innerHTML = 'hi <b> lili </b>'
            box.outerHTML = 'hi <b> lili </b>'
            // box.textContent = 'hi <b> lili </b>'
        }, 3000)




    </script>
</body>

</html>